package com.nuc.seckill.base;

import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author 石一歌
 * @date 2022-08-04 22:57
 */
@Data
public class UserReq implements Serializable {
    @Data
    public static class BaseUserInfo implements Serializable {
        @NotNull(message = "邮箱不能为空")
        @Email
        private String email;
    }

    @Data
    public static class LoginUserInfo extends BaseUserInfo {
        @NotNull(message = "邮箱验证码不能为空")
        private String smsCode;
    }
}
